﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Control_EmpSalaryBar : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind();
        }
    }

    private void Bind()
    {
        

        if (HoverId.Value != "")
        {
            HyperLink HY = ((HyperLink)this.FindControl(HoverId.Value));
            HY.CssClass = "ChileOnHover";
        }
        try
        {
            if (Request["action"] != null)
            {
                if (Request["action"].ToString() == "add")
                {
                    TabsFunction.Visible = false;
                    //EmpProfile.NavigateUrl = "../Employees/EmployeesProfile.aspx?action=add";
                }
                else
                {

                    string mode = Request["mode"].ToString();
                    string action = Request["action"].ToString();
                    string eid = Request["eid"].ToString();


                    string redurl = "mode=" + mode + "&action=" + action + "&eid=" + eid;

                    EmpSalaryAdjust.NavigateUrl = "javascript:void(0)";
                    EmpSalaryAdjust.Attributes.Add("onclick", "location.href='" + "../EmployeesSalary/EmpSalaryAdjust.aspx?" + redurl + "';return false;");

                    EmpSalaryList.NavigateUrl = "javascript:void(0)";
                    EmpSalaryList.Attributes.Add("onclick", "location.href='" + "../EmployeesSalary/EmpSalaryList.aspx?" + redurl + "';return false;");
                }

            }

        }
        catch
        {
        }
    }
}
